package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

func main() {
	router := gin.Default()

	router.GET("/index", func(context *gin.Context) {
		context.String(200, "hello world!")
	})
	//不写默认ip为0.0.0.0,代表当前机器所有的ip
	//router.Run(":8080")
	//router.Run("localhost:8080")
	//使用原生http服务的方式
	http.ListenAndServe(":8080", router)
}
